#importing Libraries
import pandas as pd
import plotly.express as px
import plotly.io as pi
#Loading Dataset
dataset = pd.read_csv("Zomato_Mumbai_Dataset.csv",delimiter = "|")
dataset
| NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | Mumbai | First International Financial Centre-- Bandra ... | https://www.zomato.com/mumbai/hitchki-bandra-k... | 1 | Casual Dining | 12noon to 130am(Mon-Sun) | Excellent | 4.9 | 3529 |
| 1 | Baba Falooda | 400 | Desserts,Ice Cream,Beverages | Mumbai | Mahim | https://www.zomato.com/mumbai/baba-falooda-mah... | 1 | Dessert Parlor | 2pm to 1am(Mon-Sun) | Very Good | 4.4 | 1723 |
| 2 | Chin Chin Chu | 1800 | Asian,Chinese | Mumbai | Juhu | https://www.zomato.com/mumbai/chin-chin-chu-ju... | 1 | Casual Dining | 12noon to 1am(Mon-Sun) | Very Good | 4.2 | 337 |
| 3 | Butterfly High | 1000 | Modern Indian | Mumbai | Bandra Kurla Complex | https://www.zomato.com/mumbai/butterfly-high-b... | 1 | Bar | 12noon to 130am(Mon-Sun) | Very Good | 4.3 | 1200 |
| 4 | BKC DIVE | 1200 | North Indian,Chinese,Continental | Mumbai | Bandra Kurla Complex | https://www.zomato.com/mumbai/bkc-dive-bandra-... | 1 | Bar | 1130am to 1am(Mon-Sun) | Veľmi dobré | 4.4 | 5995 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 15076 | Hari Om Snack Bar | 350 | Fast Food,South Indian,Chinese | Mumbai | Kandivali West | https://www.zomato.com/mumbai/hari-om-snack-ba... | 99 | Quick Bites | 11am to 230am(Mon-Sun) | Good | 3.7 | 64 |
| 15077 | PitaBurg | 400 | Fast Food,Lebanese | Mumbai | Lower Parel | https://www.zomato.com/mumbai/pitaburg-lower-p... | 99 | none | 11am to 11pm(Mon,Tue,Wed,Thu,Sun),11am to ... | Average | 3.4 | 99 |
| 15078 | Uncha Otlawala | 300 | Desserts,Ice Cream | Mumbai | Kandivali West | https://www.zomato.com/mumbai/uncha-otlawala-1... | 99 | Dessert Parlor | 9am to 1230AM(Mon-Sun) | Good | 3.5 | 29 |
| 15079 | Mandarin Panda | 400 | Desserts,Chinese,Thai | Mumbai | Malad West | https://www.zomato.com/mumbai/mandarin-panda-m... | 99 | none | 12noon to 330pm,7pm to 1am(Mon-Sun) | Good | 3.7 | 121 |
| 15080 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
15081 rows × 12 columns
dataset.shape
(15081, 12)
dataset.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 15081 entries, 0 to 15080 Data columns (total 12 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 NAME 15081 non-null object 1 PRICE 15080 non-null object 2 CUSINE_CATEGORY 15079 non-null object 3 CITY 15080 non-null object 4 REGION 15080 non-null object 5 URL 15080 non-null object 6 PAGE NO 15080 non-null object 7 CUSINE TYPE 15080 non-null object 8 TIMING 15015 non-null object 9 RATING_TYPE 14070 non-null object 10 RATING 15080 non-null object 11 VOTES 15080 non-null object dtypes: object(12) memory usage: 1.4+ MB
dataset.describe()
| NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 15081 | 15080 | 15079 | 15080 | 15080 | 15080 | 15080 | 15080 | 15015 | 14070 | 15080 | 15080 |
| unique | 12720 | 67 | 3183 | 2 | 241 | 13823 | 944 | 23 | 2551 | 31 | 35 | 1124 |
| top | NAME | 400 | CUSINE_CATEGORY | Mumbai | REGION | URL | PAGE NO | Quick Bites | 11am to 11pm(Mon-Sun) | Average | - | - |
| freq | 942 | 2042 | 942 | 14138 | 942 | 942 | 942 | 5262 | 1192 | 5112 | 2360 | 2360 |
#Checking Null Values
dataset.isnull().sum()
NAME 0 PRICE 1 CUSINE_CATEGORY 2 CITY 1 REGION 1 URL 1 PAGE NO 1 CUSINE TYPE 1 TIMING 66 RATING_TYPE 1011 RATING 1 VOTES 1 dtype: int64
pageNo = dataset["PAGE NO"] == "PAGE NO"
dataset[pageNo]
| NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 15 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| 31 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| 47 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| 63 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| 79 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 15000 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| 15016 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| 15032 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| 15048 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
| 15064 | NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
942 rows × 12 columns
dataset = dataset[~pageNo]
dataset
| NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | Mumbai | First International Financial Centre-- Bandra ... | https://www.zomato.com/mumbai/hitchki-bandra-k... | 1 | Casual Dining | 12noon to 130am(Mon-Sun) | Excellent | 4.9 | 3529 |
| 1 | Baba Falooda | 400 | Desserts,Ice Cream,Beverages | Mumbai | Mahim | https://www.zomato.com/mumbai/baba-falooda-mah... | 1 | Dessert Parlor | 2pm to 1am(Mon-Sun) | Very Good | 4.4 | 1723 |
| 2 | Chin Chin Chu | 1800 | Asian,Chinese | Mumbai | Juhu | https://www.zomato.com/mumbai/chin-chin-chu-ju... | 1 | Casual Dining | 12noon to 1am(Mon-Sun) | Very Good | 4.2 | 337 |
| 3 | Butterfly High | 1000 | Modern Indian | Mumbai | Bandra Kurla Complex | https://www.zomato.com/mumbai/butterfly-high-b... | 1 | Bar | 12noon to 130am(Mon-Sun) | Very Good | 4.3 | 1200 |
| 4 | BKC DIVE | 1200 | North Indian,Chinese,Continental | Mumbai | Bandra Kurla Complex | https://www.zomato.com/mumbai/bkc-dive-bandra-... | 1 | Bar | 1130am to 1am(Mon-Sun) | Veľmi dobré | 4.4 | 5995 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 15076 | Hari Om Snack Bar | 350 | Fast Food,South Indian,Chinese | Mumbai | Kandivali West | https://www.zomato.com/mumbai/hari-om-snack-ba... | 99 | Quick Bites | 11am to 230am(Mon-Sun) | Good | 3.7 | 64 |
| 15077 | PitaBurg | 400 | Fast Food,Lebanese | Mumbai | Lower Parel | https://www.zomato.com/mumbai/pitaburg-lower-p... | 99 | none | 11am to 11pm(Mon,Tue,Wed,Thu,Sun),11am to ... | Average | 3.4 | 99 |
| 15078 | Uncha Otlawala | 300 | Desserts,Ice Cream | Mumbai | Kandivali West | https://www.zomato.com/mumbai/uncha-otlawala-1... | 99 | Dessert Parlor | 9am to 1230AM(Mon-Sun) | Good | 3.5 | 29 |
| 15079 | Mandarin Panda | 400 | Desserts,Chinese,Thai | Mumbai | Malad West | https://www.zomato.com/mumbai/mandarin-panda-m... | 99 | none | 12noon to 330pm,7pm to 1am(Mon-Sun) | Good | 3.7 | 121 |
| 15080 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
14139 rows × 12 columns
dataset.isnull().sum()
NAME 0 PRICE 1 CUSINE_CATEGORY 2 CITY 1 REGION 1 URL 1 PAGE NO 1 CUSINE TYPE 1 TIMING 66 RATING_TYPE 1011 RATING 1 VOTES 1 dtype: int64
dataset[dataset["PRICE"].isnull()]
| NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 15080 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
dataset = dataset.drop(labels= 15080,axis = 0)
dataset[dataset["PRICE"].isnull()]
| NAME | PRICE | CUSINE_CATEGORY | CITY | REGION | URL | PAGE NO | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES |
|---|
#Replacing Null Values
dataset.fillna("NA",inplace = True)
dataset.isnull().sum()
NAME 0 PRICE 0 CUSINE_CATEGORY 0 CITY 0 REGION 0 URL 0 PAGE NO 0 CUSINE TYPE 0 TIMING 0 RATING_TYPE 0 RATING 0 VOTES 0 dtype: int64
dataset["RATING"].value_counts()
RATING - 2360 3.5 1094 3.4 1036 3.6 960 NEW 953 3.3 926 3.7 917 3.2 801 3.8 782 3.1 734 3.0 622 3.9 596 2.9 409 4.0 408 2.8 309 4.1 298 4.2 199 2.7 170 4.3 148 4.4 99 2.6 77 Opening 57 4.5 46 2.5 39 4.6 32 2.4 26 4.7 13 2.3 10 2.1 5 2.2 4 4.8 4 4.9 2 1.8 1 2.0 1 Name: count, dtype: int64
dataset["RATING"].replace(to_replace = ["Opening","-","NEW"], value = '0', inplace = True)
C:\Users\swdeveloper.AD\AppData\Local\Temp\ipykernel_5384\4096954408.py:1: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
dataset["RATING"].replace(to_replace = ["Opening","-","NEW"], value = '0', inplace = True)
dataset["RATING"].value_counts()
RATING 0 3370 3.5 1094 3.4 1036 3.6 960 3.3 926 3.7 917 3.2 801 3.8 782 3.1 734 3.0 622 3.9 596 2.9 409 4.0 408 2.8 309 4.1 298 4.2 199 2.7 170 4.3 148 4.4 99 2.6 77 4.5 46 2.5 39 4.6 32 2.4 26 4.7 13 2.3 10 2.1 5 2.2 4 4.8 4 4.9 2 1.8 1 2.0 1 Name: count, dtype: int64
dataset["VOTES"].value_counts()
VOTES
- 2360
NEW 953
4 364
5 320
6 288
...
1029 1
7350 1
964 1
585 1
1249 1
Name: count, Length: 1123, dtype: int64
dataset["VOTES"].replace(to_replace = ["-","NEW","Opening"], value = '0', inplace = True)
C:\Users\swdeveloper.AD\AppData\Local\Temp\ipykernel_5384\694549743.py:1: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
dataset["VOTES"].replace(to_replace = ["-","NEW","Opening"], value = '0', inplace = True)
dataset["VOTES"].value_counts()
VOTES
0 3371
4 364
5 320
6 288
7 277
...
1029 1
7350 1
964 1
585 1
1249 1
Name: count, Length: 1120, dtype: int64
#Converting to Int,Float Datatype
dataset["PRICE"] = dataset["PRICE"].astype("int64")
dataset["RATING"] = dataset["RATING"].astype("float64")
dataset["VOTES"] = dataset["VOTES"].astype("int64")
dataset.info()
<class 'pandas.core.frame.DataFrame'> Index: 14138 entries, 0 to 15079 Data columns (total 12 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 NAME 14138 non-null object 1 PRICE 14138 non-null int64 2 CUSINE_CATEGORY 14138 non-null object 3 CITY 14138 non-null object 4 REGION 14138 non-null object 5 URL 14138 non-null object 6 PAGE NO 14138 non-null object 7 CUSINE TYPE 14138 non-null object 8 TIMING 14138 non-null object 9 RATING_TYPE 14138 non-null object 10 RATING 14138 non-null float64 11 VOTES 14138 non-null int64 dtypes: float64(1), int64(2), object(9) memory usage: 1.4+ MB
dataset["TIMING"].value_counts()
TIMING
11am to 11pm(Mon-Sun) 1192
11am to 12midnight(Mon-Sun) 632
12noon to 12midnight(Mon-Sun) 467
11am to 1130pm(Mon-Sun) 309
10am to 10pm(Mon-Sun) 267
...
1130am to 4pm,630pm to 1230AM... 1
12midnight to 5am,12noon to 12midnight(Mon-Sun) 1
12midnight to 1230AM,12noon to 4pm,7pm to ... 1
12noon to 330pm,630pm to 12midnight... 1
8am to 11pm,12midnight to 115am(Mon-Sun) 1
Name: count, Length: 2551, dtype: int64
tempDf = dataset["TIMING"].str.split("(", n = 1, expand = True)
tempDf
| 0 | 1 | |
|---|---|---|
| 0 | 12noon to 130am | Mon-Sun) |
| 1 | 2pm to 1am | Mon-Sun) |
| 2 | 12noon to 1am | Mon-Sun) |
| 3 | 12noon to 130am | Mon-Sun) |
| 4 | 1130am to 1am | Mon-Sun) |
| ... | ... | ... |
| 15075 | 8am to 11pm,12midnight to 115am | Mon-Sun) |
| 15076 | 11am to 230am | Mon-Sun) |
| 15077 | 11am to 11pm | Mon,Tue,Wed,Thu,Sun),11am to ... |
| 15078 | 9am to 1230AM | Mon-Sun) |
| 15079 | 12noon to 330pm,7pm to 1am | Mon-Sun) |
14138 rows × 2 columns
dataset["TIMING"] = tempDf[0]
dataset["DAYS_OPEN"] = tempDf[1]
dataset.drop(['URL', 'PAGE NO', 'CITY'],axis = 1, inplace = True)
dataset.head()
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | First International Financial Centre-- Bandra ... | Casual Dining | 12noon to 130am | Excellent | 4.9 | 3529 | Mon-Sun) |
| 1 | Baba Falooda | 400 | Desserts,Ice Cream,Beverages | Mahim | Dessert Parlor | 2pm to 1am | Very Good | 4.4 | 1723 | Mon-Sun) |
| 2 | Chin Chin Chu | 1800 | Asian,Chinese | Juhu | Casual Dining | 12noon to 1am | Very Good | 4.2 | 337 | Mon-Sun) |
| 3 | Butterfly High | 1000 | Modern Indian | Bandra Kurla Complex | Bar | 12noon to 130am | Very Good | 4.3 | 1200 | Mon-Sun) |
| 4 | BKC DIVE | 1200 | North Indian,Chinese,Continental | Bandra Kurla Complex | Bar | 1130am to 1am | Veľmi dobré | 4.4 | 5995 | Mon-Sun) |
dataset['DAYS_OPEN'] = dataset['DAYS_OPEN'].str.replace(r'\)', '', regex=True)
dataset.head()
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | First International Financial Centre-- Bandra ... | Casual Dining | 12noon to 130am | Excellent | 4.9 | 3529 | Mon-Sun |
| 1 | Baba Falooda | 400 | Desserts,Ice Cream,Beverages | Mahim | Dessert Parlor | 2pm to 1am | Very Good | 4.4 | 1723 | Mon-Sun |
| 2 | Chin Chin Chu | 1800 | Asian,Chinese | Juhu | Casual Dining | 12noon to 1am | Very Good | 4.2 | 337 | Mon-Sun |
| 3 | Butterfly High | 1000 | Modern Indian | Bandra Kurla Complex | Bar | 12noon to 130am | Very Good | 4.3 | 1200 | Mon-Sun |
| 4 | BKC DIVE | 1200 | North Indian,Chinese,Continental | Bandra Kurla Complex | Bar | 1130am to 1am | Veľmi dobré | 4.4 | 5995 | Mon-Sun |
dataset.isnull().sum()
NAME 0 PRICE 0 CUSINE_CATEGORY 0 REGION 0 CUSINE TYPE 0 TIMING 0 RATING_TYPE 0 RATING 0 VOTES 0 DAYS_OPEN 160 dtype: int64
dataset.fillna('NA',inplace = True)
dataset.isnull().sum()
NAME 0 PRICE 0 CUSINE_CATEGORY 0 REGION 0 CUSINE TYPE 0 TIMING 0 RATING_TYPE 0 RATING 0 VOTES 0 DAYS_OPEN 0 dtype: int64
dataset.info()
<class 'pandas.core.frame.DataFrame'> Index: 14138 entries, 0 to 15079 Data columns (total 10 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 NAME 14138 non-null object 1 PRICE 14138 non-null int64 2 CUSINE_CATEGORY 14138 non-null object 3 REGION 14138 non-null object 4 CUSINE TYPE 14138 non-null object 5 TIMING 14138 non-null object 6 RATING_TYPE 14138 non-null object 7 RATING 14138 non-null float64 8 VOTES 14138 non-null int64 9 DAYS_OPEN 14138 non-null object dtypes: float64(1), int64(2), object(7) memory usage: 1.2+ MB
dataset = dataset[~((dataset['RATING'] == 0.0) | (dataset['VOTES'] == 0))]
dataset
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | First International Financial Centre-- Bandra ... | Casual Dining | 12noon to 130am | Excellent | 4.9 | 3529 | Mon-Sun |
| 1 | Baba Falooda | 400 | Desserts,Ice Cream,Beverages | Mahim | Dessert Parlor | 2pm to 1am | Very Good | 4.4 | 1723 | Mon-Sun |
| 2 | Chin Chin Chu | 1800 | Asian,Chinese | Juhu | Casual Dining | 12noon to 1am | Very Good | 4.2 | 337 | Mon-Sun |
| 3 | Butterfly High | 1000 | Modern Indian | Bandra Kurla Complex | Bar | 12noon to 130am | Very Good | 4.3 | 1200 | Mon-Sun |
| 4 | BKC DIVE | 1200 | North Indian,Chinese,Continental | Bandra Kurla Complex | Bar | 1130am to 1am | Veľmi dobré | 4.4 | 5995 | Mon-Sun |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 15075 | Tirupati Balaji | 500 | Chinese,Fast Food,North Indian | Oshiwara-- Andheri West | Casual Dining | 8am to 11pm,12midnight to 115am | Good | 3.5 | 267 | Mon-Sun |
| 15076 | Hari Om Snack Bar | 350 | Fast Food,South Indian,Chinese | Kandivali West | Quick Bites | 11am to 230am | Good | 3.7 | 64 | Mon-Sun |
| 15077 | PitaBurg | 400 | Fast Food,Lebanese | Lower Parel | none | 11am to 11pm | Average | 3.4 | 99 | Mon,Tue,Wed,Thu,Sun,11am to ... |
| 15078 | Uncha Otlawala | 300 | Desserts,Ice Cream | Kandivali West | Dessert Parlor | 9am to 1230AM | Good | 3.5 | 29 | Mon-Sun |
| 15079 | Mandarin Panda | 400 | Desserts,Chinese,Thai | Malad West | none | 12noon to 330pm,7pm to 1am | Good | 3.7 | 121 | Mon-Sun |
10767 rows × 10 columns
dataset["RATING_TYPE"].value_counts()
RATING_TYPE Average 5111 Good 4330 Very Good 1137 Excellent 95 Poor 47 Veľmi dobré 6 Skvělá volba 4 Dobrze 4 Bardzo dobrze 3 Ortalama 2 Bueno 2 İyi 2 Buono 2 Dobré 2 Bom 2 Priemer 2 Průměr 2 Muito Bom 2 Promedio 2 Muy Bueno 1 Sangat Baik 1 Média 1 Biasa 1 Skvělé 1 Baik 1 Çok iyi 1 Excelente 1 Velmi dobré 1 Media 1 Name: count, dtype: int64
#Replacing the Values
dataset['RATING_TYPE'].replace(to_replace='Excelente' , value='Excellent', inplace=True)
dataset['RATING_TYPE'].replace(to_replace=['Veľmi dobré','Bardzo dobrze','Muy Bueno','Velmi dobré'] , value='Very Good', inplace=True)
dataset['RATING_TYPE'].replace(to_replace=['Skvělá volba','Dobrze','Bueno','Buono','Dobré','Bom','Skvělé'] , value='Good', inplace=True)
dataset['RATING_TYPE'].replace(to_replace=['Priemer','Média','Çok iyi'] , value='Average', inplace=True)
dataset['RATING_TYPE'].replace(to_replace=['Průměr','Promedio','Ortalama','Muito Bom','İyi'] , value='Poor', inplace=True)
dataset['RATING_TYPE'].replace(to_replace=['Baik','Biasa','Media','Sangat Baik'] , value='Very Poor', inplace=True)
C:\Users\swdeveloper.AD\AppData\Local\Temp\ipykernel_5384\4268798849.py:2: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
dataset['RATING_TYPE'].replace(to_replace='Excelente' , value='Excellent', inplace=True)
C:\Users\swdeveloper.AD\AppData\Local\Temp\ipykernel_5384\4268798849.py:3: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
dataset['RATING_TYPE'].replace(to_replace=['Veľmi dobré','Bardzo dobrze','Muy Bueno','Velmi dobré'] , value='Very Good', inplace=True)
dataset["RATING_TYPE"].value_counts()
RATING_TYPE Average 5115 Good 4347 Very Good 1148 Excellent 96 Poor 57 Very Poor 4 Name: count, dtype: int64
dataset["REGION"].value_counts()
REGION
Mira Road 405
Malad West 308
Chembur 277
Kharghar 268
Borivali West 264
...
Hotel Emerald-- Juhu 1
Trident-- Bandra Kurla Complex 1
Sea Princess-- Juhu 1
Aureole Hotel-- Andheri East 1
Hotel Satkar Residency-- Majiwada 1
Name: count, Length: 237, dtype: int64
dataset["REGION"] = dataset["REGION"].str.replace("[a-zA-Z].+-- ","",regex = True)
dataset["REGION"].value_counts()
REGION
Thane West 712
Mira Road 412
Andheri West 407
Malad West 316
Bandra West 282
...
Andheri East 2
CBD Belapur 1
Girgaon Chowpatty 1
Goregaon 1
Dadar 1
Name: count, Length: 120, dtype: int64
dataset["REGION"] = dataset["REGION"].str.replace("west| West| East| east","",regex = True)
dataset["REGION"].value_counts()
REGION
Thane 726
Mira Road 412
Andheri 409
Malad 378
Kandivali 377
...
Flea Bazaar Café 3
Majiwada 3
Panvel 2
CBD Belapur 1
Girgaon Chowpatty 1
Name: count, Length: 101, dtype: int64
dataset['REGION'] = dataset['REGION'].str.replace('4 Bungalows|7 Andheri|Azad Nagar|Near Andheri Station|Veera Desai Area','Andheri',regex = True)
dataset['REGION'] = dataset['REGION'].str.replace('Bandra Kurla Complex','Bandra',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('CBD-Belapur','CBD Belapur',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('Girgaon Chowpatty','Chowpatty',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('Dadar Shivaji Park','Dadar',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('Flea Bazaar Café|Kamala Mills Compound','Lower Parel',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('Runwal Green','Mulund',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('Mumbai CST Area','Mumbai Central',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('Kopar Khairane|Seawoods|Turbhe|Ulwe','Navi Mumbai',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('New Panvel|Old Panvel','Panvel',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('Kamothe','Sion',regex=True)
dataset['REGION'] = dataset['REGION'].str.replace('Ghodbunder Road|Majiwada','Thane',regex=True)
dataset[dataset.duplicated()]
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 4064 | Sai Sannidhi Restaurant & Bar | 1000 | North Indian,Konkan | Dahisar | Casual Dining | 11am to 12midnight | Good | 3.7 | 99 | Mon-Sun |
| 4068 | Konkan Katta | 400 | Seafood,Maharashtrian,Malwani | Mahakali | Quick Bites | 11am to 330pm,630pm to 1130pm | Good | 3.5 | 181 | Mon-Sun |
| 4082 | Usmaniya Hotel | 600 | Mughlai | Fort | Casual Dining | 1030am to 1130pm | Average | 3.2 | 8 | Mon-Sun |
| 4083 | Gina's Cakes | 450 | Bakery | Dombivali | none | 11am to 11pm | Good | 3.5 | 49 | Mon-Sun |
| 4084 | Konkanastha Lunch Home | 400 | Seafood,Malwani | Chakala | Casual Dining | 12noon to 3pm,730pm to 1030pm | Good | 3.5 | 44 | Mon-Sun |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 14200 | Mezbaan Family Restaurant | 350 | Chinese,Mughlai | Mumbra | Dhaba | 12noon to 1230AM | Average | 2.8 | 97 | Mon-Sun |
| 14204 | Jyoti Lunch Home | 650 | Chinese,North Indian,Seafood,Mughlai | Mulund | Casual Dining | 11am to 1230AM | Good | 3.5 | 49 | Mon-Sun |
| 14253 | On Toes | 900 | Italian,North Indian,Chinese | Malad | Casual Dining | 12noon to 3pm,7pm to 1230AM | Good | 3.6 | 76 | Mon-Sun |
| 14761 | Frosty Farm | 400 | Ice Cream,Desserts,Fast Food | Malad | Dessert Parlor | 1pm to 1215AM | Good | 3.6 | 120 | Mon-Sun |
| 14928 | Shree Manu Sagar | 300 | North Indian,Chinese,Indian | Ghansoli | Quick Bites | 1130am to 415pm,7pm to 1215AM | Average | 3.3 | 51 | Mon-Sun |
220 rows × 10 columns
dataset = dataset.drop_duplicates()
dataset.shape
(10547, 10)
zomato_dataset = dataset.copy()
zomato_dataset
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | Bandra | Casual Dining | 12noon to 130am | Excellent | 4.9 | 3529 | Mon-Sun |
| 1 | Baba Falooda | 400 | Desserts,Ice Cream,Beverages | Mahim | Dessert Parlor | 2pm to 1am | Very Good | 4.4 | 1723 | Mon-Sun |
| 2 | Chin Chin Chu | 1800 | Asian,Chinese | Juhu | Casual Dining | 12noon to 1am | Very Good | 4.2 | 337 | Mon-Sun |
| 3 | Butterfly High | 1000 | Modern Indian | Bandra | Bar | 12noon to 130am | Very Good | 4.3 | 1200 | Mon-Sun |
| 4 | BKC DIVE | 1200 | North Indian,Chinese,Continental | Bandra | Bar | 1130am to 1am | Very Good | 4.4 | 5995 | Mon-Sun |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 15075 | Tirupati Balaji | 500 | Chinese,Fast Food,North Indian | Andheri | Casual Dining | 8am to 11pm,12midnight to 115am | Good | 3.5 | 267 | Mon-Sun |
| 15076 | Hari Om Snack Bar | 350 | Fast Food,South Indian,Chinese | Kandivali | Quick Bites | 11am to 230am | Good | 3.7 | 64 | Mon-Sun |
| 15077 | PitaBurg | 400 | Fast Food,Lebanese | Lower Parel | none | 11am to 11pm | Average | 3.4 | 99 | Mon,Tue,Wed,Thu,Sun,11am to ... |
| 15078 | Uncha Otlawala | 300 | Desserts,Ice Cream | Kandivali | Dessert Parlor | 9am to 1230AM | Good | 3.5 | 29 | Mon-Sun |
| 15079 | Mandarin Panda | 400 | Desserts,Chinese,Thai | Malad | none | 12noon to 330pm,7pm to 1am | Good | 3.7 | 121 | Mon-Sun |
10547 rows × 10 columns
Exploratory Data Analysis¶
Q1) How many restaurants are in Mumbai for each type of cuisine?
#pip install -U kaleido
restaurant = px.histogram(zomato_dataset,x = "CUSINE TYPE",color = "CUSINE TYPE",title = "No of Restaurants By Cusine Type in Mumbai",labels = {"CUSINE TYPE" : "Cusine"})
restaurant.show()
Q2) What are the percentage of restaurants by Rating Type in Mumbai?
ratings = zomato_dataset["RATING_TYPE"].value_counts().reset_index()
ratings.rename(columns = {'index' : 'RATING_TYPE','count' : "No of Restaurants"},inplace = True)
ratings
| RATING_TYPE | No of Restaurants | |
|---|---|---|
| 0 | Average | 4983 |
| 1 | Good | 4263 |
| 2 | Very Good | 1145 |
| 3 | Excellent | 96 |
| 4 | Poor | 56 |
| 5 | Very Poor | 4 |
px.pie(ratings,names = "RATING_TYPE",values = "No of Restaurants",color = "RATING_TYPE", title = "Percentage of Restaurants in Mumbai")
Q3) Which are the Top 10 highest rated Seafood Restaurant in Mumbai?
seafood = zomato_dataset[zomato_dataset["CUSINE_CATEGORY"].str.contains("Seafood") ]
seafood.sort_values(by="RATING",ascending = False).head(10)
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 7104 | Thangabali | 1000 | Seafood,South Indian,Mangalorean,Andhra,Kerala | Khar | Bar | 12noon to 4pm,7pm to 3am | Excellent | 4.7 | 564 | Mon-Sun |
| 76 | Ceremonial Kitchen & Co | 1000 | Seafood,Maharashtrian,North Indian,Chinese | Thane | Casual Dining | 1130am to 1130pm | Excellent | 4.6 | 350 | Mon-Sun |
| 13685 | Maharashtra Lunch Home | 600 | Maharashtrian,Malwani,Konkan,Seafood | Kharghar | Casual Dining | 11am to 345pm,7pm to 1145pm | Excellent | 4.6 | 209 | Mon-Sun |
| 12433 | Quarter Canteen | 1100 | North Indian,Seafood,Chinese | Bandra | Casual Dining | 12noon to 330pm,7pm to 1am | Excellent | 4.5 | 573 | Mon-Sun |
| 902 | The Harbour Bay - SeaFood Kitchen & Bar | 2400 | Seafood,Beverages | Bandra | Casual Dining | 12noon to 1am | Excellent | 4.5 | 100 | Mon-Sun |
| 884 | Rajmanya- Seafood family restaurant | 800 | Maharashtrian,Konkan,Seafood | Vashi | Casual Dining | 11am to 11pm | Excellent | 4.5 | 178 | Mon-Sun |
| 3380 | Peco Peco | 700 | Chinese,Seafood,Asian | Powai | none | 12noon to 330pm,7pm to 1230AM | Excellent | 4.5 | 497 | Mon-Sun |
| 9954 | Pi Bar and Kitchen | 1600 | Continental,European,Italian,Seafood,Pizza,Des... | Andheri | Bar | 12noon to 6pm,7pm to 12midnight | Excellent | 4.5 | 2068 | Mon-Sun |
| 903 | Ferry Wharf | 1500 | Seafood,Mangalorean | Bandra | Casual Dining | 11am to 330pm,7pm to 1230AM | Very Good | 4.4 | 459 | Mon-Sun |
| 915 | Monis Bar and Restaurant | 1000 | North Indian,Chinese,Continental,Seafood,Bever... | Thane | Casual Dining | 1130am to 330pm,6pm to 1130pm | Very Good | 4.4 | 662 | Mon-Sun |
Q4) Which is the best Food Truck in Mumbai?
foodTruck = zomato_dataset[zomato_dataset["CUSINE TYPE"].str.contains("Food Truck")]
foodTruck.sort_values(by = "RATING", ascending = False).head(3)
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 262 | Dumpling Delights | 200 | Momos | Matunga | Food Truck | 430pm to 930pm | Very Good | 4.3 | 212 | Mon-Sun |
| 1017 | Street Food Co. | 250 | Fast Food,Chinese | Virar | Food Truck | 6pm to 3am | Very Good | 4.1 | 274 | Mon-Sun |
| 7922 | Honeys Delights | 100 | Fast Food,Burger | Malad | Food Truck | Closed | Good | 3.9 | 66 | Mon,4am to 7am(Tue-Sun |
Q5) Which places have the highest rated restaurant for each Cuisine Type in Mumbai?
highest_rating = zomato_dataset[zomato_dataset["RATING"] >= 4.5]
highest_rating
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | Bandra | Casual Dining | 12noon to 130am | Excellent | 4.9 | 3529 | Mon-Sun |
| 6 | Persian Darbar | 1300 | Biryani,North Indian,Chinese,Mughlai | Marol | Casual Dining | 10am to 3am | Excellent | 4.5 | 3058 | Mon-Sun |
| 7 | Tanatan | 1500 | Modern Indian | Juhu | Casual Dining | 12noon to 130am | Excellent | 4.7 | 1842 | Mon-Sun |
| 9 | Plum by Bent Chair | 1800 | Asian | Lower Parel | Casual Dining | 12noon to 1am | Excellent | 4.7 | 1876 | Mon-Sun |
| 10 | Angrezi Dhaba | 1500 | North Indian,Chinese,Thai,European | Dadar | Bar | 12noon to 1am | Excellent | 4.5 | 2092 | Mon-Sun |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 14228 | Zaika Crave - Club Aquaria | 1300 | North Indian,Continental,Chinese,Desserts | Borivali | Casual Dining | 11am to 330pm,7pm to 1130pm | Excellent | 4.5 | 1302 | Mon,Tue,Wed... |
| 14234 | Cone Culture | 250 | European | Kharghar | Casual Dining | Closed | Excellent | 4.6 | 492 | Mon,12noon to 11pm(Tue-Sun |
| 15007 | Dessertino | 300 | Desserts,Ice Cream | Kandivali | Dessert Parlor | 11am to 12midnight | Excellent | 4.8 | 184 | Mon-Sun |
| 15051 | Tick-eat | 800 | North Indian,Italian,Chinese,Mexican,Lebanese | Mulund | Casual Dining | 1130am to 330pm,7pm to 1130pm | Excellent | 4.5 | 754 | Mon-Sun |
| 15056 | Daftar Goregaon | 750 | Pizza,Chinese,North Indian,Beverages | Goregaon | Casual Dining | 12noon to 1130pm | Excellent | 4.6 | 388 | Mon-Sun |
97 rows × 10 columns
px.histogram(highest_rating,x="REGION",color = "CUSINE TYPE" , title = "No of Best Restaurants Region Wise")
Q6) What is the Avg Price Distibution of highest rated restaurant for each Cuisine Type in Mumbai?
avg_price = highest_rating.groupby(by = ["REGION","CUSINE TYPE"])["PRICE"].mean().reset_index()
avg_price.head()
| REGION | CUSINE TYPE | PRICE | |
|---|---|---|---|
| 0 | Andheri | Bar | 1600.0 |
| 1 | Andheri | Café | 800.0 |
| 2 | Andheri | Casual Dining | 1175.0 |
| 3 | Andheri | Dessert Parlor | 300.0 |
| 4 | Andheri | Lounge | 1700.0 |
px.scatter(highest_rating,x="REGION",y = "PRICE", color = "CUSINE TYPE", symbol = "CUSINE TYPE",title="Avg Price Distribution").update_traces(marker_size=10)
Q7) Which areas have a large number of Chinese Restaurant Market?
chinese_rest = zomato_dataset[zomato_dataset["CUSINE_CATEGORY"].str.contains("Chinese")]
chinese_rest
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | Bandra | Casual Dining | 12noon to 130am | Excellent | 4.9 | 3529 | Mon-Sun |
| 2 | Chin Chin Chu | 1800 | Asian,Chinese | Juhu | Casual Dining | 12noon to 1am | Very Good | 4.2 | 337 | Mon-Sun |
| 4 | BKC DIVE | 1200 | North Indian,Chinese,Continental | Bandra | Bar | 1130am to 1am | Very Good | 4.4 | 5995 | Mon-Sun |
| 5 | Flea Bazaar Café | 800 | American,Asian,Street Food,North Indian,Luckno... | Lower Parel | Café | 12noon to 1am | Very Good | 4.2 | 2042 | Mon-Sun |
| 6 | Persian Darbar | 1300 | Biryani,North Indian,Chinese,Mughlai | Marol | Casual Dining | 10am to 3am | Excellent | 4.5 | 3058 | Mon-Sun |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 15071 | Lucknow Zaika | 500 | North Indian,Chinese | Kurla | Quick Bites | 12noon to 2am | Average | 2.6 | 36 | Mon-Sun |
| 15072 | Zuha's Kitchen | 400 | Chinese,North Indian,Mughlai | Mumbai Central | Quick Bites | 12noon to 4pm,730pm to 430am | Average | 3.3 | 13 | Mon-Sun |
| 15075 | Tirupati Balaji | 500 | Chinese,Fast Food,North Indian | Andheri | Casual Dining | 8am to 11pm,12midnight to 115am | Good | 3.5 | 267 | Mon-Sun |
| 15076 | Hari Om Snack Bar | 350 | Fast Food,South Indian,Chinese | Kandivali | Quick Bites | 11am to 230am | Good | 3.7 | 64 | Mon-Sun |
| 15079 | Mandarin Panda | 400 | Desserts,Chinese,Thai | Malad | none | 12noon to 330pm,7pm to 1am | Good | 3.7 | 121 | Mon-Sun |
5119 rows × 10 columns
chinese_r = chinese_rest.groupby(by = "REGION").agg({'NAME':'count','PRICE' : 'mean'})
chinese_r = chinese_r.sort_values('NAME',ascending = False)
chinese_r.head()
| NAME | PRICE | |
|---|---|---|
| REGION | ||
| Thane | 371 | 590.983827 |
| Andheri | 313 | 627.316294 |
| Mira Road | 224 | 553.348214 |
| Malad | 186 | 604.032258 |
| Goregaon | 163 | 548.773006 |
Q8) Is there a relation between Price and Rating by each Cuisine Type?
rating_price = zomato_dataset.groupby(by = ["CUSINE TYPE","RATING"])["PRICE"].mean().reset_index()
rating_price.head()
| CUSINE TYPE | RATING | PRICE | |
|---|---|---|---|
| 0 | Bakery | 2.7 | 400.000000 |
| 1 | Bakery | 2.8 | 285.714286 |
| 2 | Bakery | 2.9 | 328.571429 |
| 3 | Bakery | 3.0 | 300.000000 |
| 4 | Bakery | 3.1 | 369.117647 |
px.line(rating_price,y= "PRICE",x = "RATING",color = "CUSINE TYPE")
Q9) Is there a relation between Region and Price?
region_price = zomato_dataset.groupby("REGION")["PRICE"].mean().reset_index()
region_price.head()
| REGION | PRICE | |
|---|---|---|
| 0 | Airoli | 452.287582 |
| 1 | Alibaug | 665.000000 |
| 2 | Ambernath | 514.000000 |
| 3 | Andheri | 562.506596 |
| 4 | Bandra | 724.945946 |
px.scatter(region_price,x="REGION",y="PRICE").update_traces(marker_size= 7)
Q10) Find the list of Affordable Restaurants?
affordable_rest = zomato_dataset[["NAME","CUSINE TYPE","REGION","CUSINE_CATEGORY","RATING","PRICE"]]
affordable_rest = affordable_rest[affordable_rest["PRICE"] <= affordable_rest["PRICE"].max() / 4].sort_values(by = "PRICE" ,ascending = False)
affordable_rest
| NAME | CUSINE TYPE | REGION | CUSINE_CATEGORY | RATING | PRICE | |
|---|---|---|---|---|---|---|
| 7301 | SamBar Pub & Kitchen | Pub | Khar | Finger Food,South Indian,North Indian | 3.9 | 1250 |
| 6045 | Fabelle at The Chocolate Boutique - ITC Grand ... | Dessert Parlor | Parel | Desserts | 3.7 | 1250 |
| 964 | Bijoli Grill | Casual Dining | Powai | Bengali | 3.8 | 1250 |
| 2068 | Young Chilli | Casual Dining | Vashi | Asian,Continental,North Indian | 4.1 | 1200 |
| 1882 | Cafe at The NCPA | Casual Dining | Nariman Point | American,Parsi,Asian,North Indian | 4.0 | 1200 |
| ... | ... | ... | ... | ... | ... | ... |
| 11239 | Cakewaali.co | Bakery | Navi Mumbai | Bakery | 3.2 | 100 |
| 8199 | Gupta's Kulfi Centre | none | Chowpatty | Desserts,Ice Cream | 3.6 | 100 |
| 2925 | Jab We Eat | none | Girgaum | South Indian,North Indian,Maharashtrian,Fast Food | 3.3 | 50 |
| 9598 | Ho5 Store | none | Matunga | Fast Food | 3.2 | 50 |
| 6137 | Sanjog Wine N Dine | Casual Dining | Thane | North Indian,Chinese | 3.5 | 5 |
10190 rows × 6 columns
highest_rating_rest = zomato_dataset[["NAME","CUSINE TYPE","REGION","CUSINE_CATEGORY","RATING","PRICE"]]
highest_rating_rest = highest_rating_rest[highest_rating_rest["RATING"] >= 4.5]
highest_rating_rest
| NAME | CUSINE TYPE | REGION | CUSINE_CATEGORY | RATING | PRICE | |
|---|---|---|---|---|---|---|
| 0 | Hitchki | Casual Dining | Bandra | Modern Indian,North Indian,Chinese,Momos,Birya... | 4.9 | 1200 |
| 6 | Persian Darbar | Casual Dining | Marol | Biryani,North Indian,Chinese,Mughlai | 4.5 | 1300 |
| 7 | Tanatan | Casual Dining | Juhu | Modern Indian | 4.7 | 1500 |
| 9 | Plum by Bent Chair | Casual Dining | Lower Parel | Asian | 4.7 | 1800 |
| 10 | Angrezi Dhaba | Bar | Dadar | North Indian,Chinese,Thai,European | 4.5 | 1500 |
| ... | ... | ... | ... | ... | ... | ... |
| 14228 | Zaika Crave - Club Aquaria | Casual Dining | Borivali | North Indian,Continental,Chinese,Desserts | 4.5 | 1300 |
| 14234 | Cone Culture | Casual Dining | Kharghar | European | 4.6 | 250 |
| 15007 | Dessertino | Dessert Parlor | Kandivali | Desserts,Ice Cream | 4.8 | 300 |
| 15051 | Tick-eat | Casual Dining | Mulund | North Indian,Italian,Chinese,Mexican,Lebanese | 4.5 | 800 |
| 15056 | Daftar Goregaon | Casual Dining | Goregaon | Pizza,Chinese,North Indian,Beverages | 4.6 | 750 |
97 rows × 6 columns
highest_afford_rest = pd.merge(affordable_rest,highest_rating_rest,how = "inner", on = ["NAME","REGION"])
#highest_afford_rest
highest_afford_rest = highest_afford_rest[['NAME', 'PRICE_x', 'CUSINE_CATEGORY_x', 'REGION', 'CUSINE TYPE_x']]
highest_afford_rest.rename(columns = {'NAME' : 'NAME' ,'PRICE_X' : 'PRICE','CUSINE_CATEGORY_X' : 'CUSINE_CATEGORY','REGION_X' : 'REGION',
'CUSINE_TYPE_X' : 'CUSINE_TYPE'},inplace = True)
highest_afford_rest
| NAME | PRICE_x | CUSINE_CATEGORY_x | REGION | CUSINE TYPE_x | |
|---|---|---|---|---|---|
| 0 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | Bandra | Casual Dining |
| 1 | The Joker Bistro | 1200 | North Indian,Chinese,Continental | CBD Belapur | Casual Dining |
| 2 | Culinary Tales | 1200 | Chinese,European,Continental,Salad,Italian,Pizza | Andheri | Casual Dining |
| 3 | Wild Dining Restaurant | 1200 | North Indian,Continental,Mexican,Chinese | Andheri | Casual Dining |
| 4 | Invento | 1200 | Chinese,Fast Food,North Indian,Italian,Mexican | Lower Parel | Casual Dining |
| ... | ... | ... | ... | ... | ... |
| 60 | Belo Pops | 300 | Ice Cream,Desserts,Beverages | Andheri | none |
| 61 | Cone Culture | 250 | European | Kharghar | Casual Dining |
| 62 | Curry And Combos Twist | 200 | North Indian,Chinese | Andheri | Quick Bites |
| 63 | Moussestruck | 200 | Desserts | Andheri | none |
| 64 | Cake Centre-The Dessert Maker | 150 | Desserts | Mohammad Ali Road | Dessert Parlor |
65 rows × 5 columns
Q10) Find the list of most Reliable Restaurants?
reliable_rest = zomato_dataset[zomato_dataset["VOTES"] >= zomato_dataset["VOTES"].mean()]
reliable_rest.sort_values(by = "VOTES" , ascending = False,inplace = True)
reliable_rest
C:\Users\swdeveloper.AD\AppData\Local\Temp\ipykernel_5384\2083225331.py:2: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | TIMING | RATING_TYPE | RATING | VOTES | DAYS_OPEN | |
|---|---|---|---|---|---|---|---|---|---|---|
| 8897 | Candies | 700 | Cafe,Italian,North Indian,Desserts | Bandra | Café | Closed | Very Good | 4.2 | 10217 | Mon,830am to 10pm(Tue-Sun |
| 3751 | Prithvi Cafe | 700 | Cafe,Fast Food | Juhu | Café | 1030am to 1030pm | Very Good | 4.4 | 8000 | Mon-Sun |
| 5337 | Chili's American Grill & Bar | 1400 | American,Mexican,Burger,Tex-Mex | Powai | Casual Dining | 12noon to 130am | Very Good | 4.3 | 7377 | Mon-Sun |
| 1251 | Joey's Pizza | 800 | Pizza | Malad | Quick Bites | 11am to 12midnight | Excellent | 4.6 | 7350 | Mon-Sun |
| 8539 | Leopold Cafe & Bar | 1600 | American,Chinese,Mughlai,Italian | Colaba | Casual Dining | 730am to 12midnight | Good | 3.9 | 7327 | Mon-Sun |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 3828 | Frozen Delight -The Dessert Cafe | 250 | Desserts,Ice Cream | Airoli | Dessert Parlor | Closed | Good | 3.9 | 178 | Mon,11am to 12midnight(Tue-Sun |
| 11211 | Soul Curry | 800 | Chinese,North Indian,Malwani,Mughlai,Biryani | Bhandup | Casual Dining | 11am to 1230AM | Good | 3.7 | 178 | Mon-Sun |
| 2891 | New Wanton Point | 450 | Chinese,North Indian,Seafood | Kandivali | Casual Dining | 11am to 12midnight | Good | 3.6 | 178 | Mon-Sun |
| 99 | Appetite - Resto Bar | 700 | North Indian,Chinese | Powai | Casual Dining | 12noon to 4pm,630pm to 130am | Good | 3.7 | 178 | Mon-Sun |
| 12267 | Buddha Bowl | 1000 | Asian,Healthy Food | Bandra | none | 12noon to 330pm,7pm to 1130pm | Very Good | 4.1 | 178 | Mon-Thu,12noon... |
2345 rows × 10 columns
reliable_rest_df = pd.merge(reliable_rest, highest_afford_rest, how='inner', on=['NAME', 'REGION'])
reliable_rest_df = reliable_rest_df[['NAME', 'PRICE_x', 'CUSINE_CATEGORY_x', 'REGION', 'CUSINE TYPE_x']]
reliable_rest_df.rename(columns={'NAME':'NAME', 'PRICE_x':'PRICE', 'CUSINE_CATEGORY_x':'CUSINE_CATEGORY',
'REGION':'REGION', 'CUSINE TYPE_x':'CUSINE TYPE'},inplace=True)
reliable_rest_df
| NAME | PRICE | CUSINE_CATEGORY | REGION | CUSINE TYPE | |
|---|---|---|---|---|---|
| 0 | Joey's Pizza | 800 | Pizza | Malad | Quick Bites |
| 1 | Vedge | 1000 | Thai,Chinese,North Indian,Mexican,Italian,Asian | Andheri | Casual Dining |
| 2 | Hitchki | 1200 | Modern Indian,North Indian,Chinese,Momos,Birya... | Bandra | Casual Dining |
| 3 | Cafe Monza | 1000 | Italian,American,Salad,Mexican | Kharghar | Casual Dining |
| 4 | Bombay Salad Co. | 900 | Salad,Healthy Food,Juices | Bandra | Casual Dining |
| 5 | Family Tree | 800 | Italian,Mexican,North Indian,Chinese,Salad | Thane | Casual Dining |
| 6 | Wild Dining Restaurant | 1200 | North Indian,Continental,Mexican,Chinese | Andheri | Casual Dining |
| 7 | Rajdhani | 950 | Gujarati,Rajasthani,North Indian | Ghatkopar | Casual Dining |
| 8 | Aquafire Restaurant | 1100 | North Indian,Continental,Chinese,Italian | Vile Parle | Casual Dining |
| 9 | Spice Republic | 1200 | Cafe,Continental,Mediterranean,Mexican,Italian... | Borivali | Café |
| 10 | Shaollin Temple | 1000 | Chinese,Thai | CBD Belapur | Casual Dining |
| 11 | Zaika Restaurant & Party Hall | 1000 | North Indian,Chinese,Beverages | Bhayandar | Casual Dining |
| 12 | Coppetto Artisan Gelato | 350 | Ice Cream,Desserts | Bandra | Dessert Parlor |
| 13 | Tick-eat | 800 | North Indian,Italian,Chinese,Mexican,Lebanese | Mulund | Casual Dining |
| 14 | Belo Pops | 300 | Ice Cream,Desserts,Beverages | Andheri | none |
| 15 | Curry Culture | 800 | North Indian,Biryani,Chinese,Kebab,Mughlai,Asian | Powai | none |
| 16 | Dum & Curry | 700 | Mughlai,North Indian,Chinese | Powai | Quick Bites |
| 17 | Culinary Tales | 1200 | Chinese,European,Continental,Salad,Italian,Pizza | Andheri | Casual Dining |
| 18 | Quarter Canteen | 1100 | North Indian,Seafood,Chinese | Bandra | Casual Dining |
| 19 | Harsh's Bistro | 800 | Chinese,Continental | Malad | Casual Dining |
| 20 | Thangabali | 1000 | Seafood,South Indian,Mangalorean,Andhra,Kerala | Khar | Bar |
| 21 | Justice Cafe and Dine | 800 | Cafe,Chinese,Italian,Continental,North Indian,... | Thane | Café |
| 22 | Shuruwat- Veg Food Journey | 600 | Continental,Tea,South Indian,Fast Food,Pizza,N... | Ghatkopar | Casual Dining |
| 23 | Peco Peco | 700 | Chinese,Seafood,Asian | Powai | none |
| 24 | Cone Culture | 250 | European | Kharghar | Casual Dining |
| 25 | The Joker Bistro | 1200 | North Indian,Chinese,Continental | CBD Belapur | Casual Dining |
| 26 | Makhan Singh | 800 | North Indian,Chinese,Biryani | Powai | none |
| 27 | Poetry By Love & Cheesecake | 1000 | Cafe,Desserts | Juhu | Café |
| 28 | Daftar Goregaon | 750 | Pizza,Chinese,North Indian,Beverages | Goregaon | Casual Dining |
| 29 | Moussestruck | 200 | Desserts | Andheri | none |
| 30 | Ceremonial Kitchen & Co | 1000 | Seafood,Maharashtrian,North Indian,Chinese | Thane | Casual Dining |
| 31 | Little West Pizza | 600 | Pizza | Borivali | Quick Bites |
| 32 | Tossin Pizza | 900 | Pizza,Italian,Fast Food | Chembur | Casual Dining |
| 33 | Maezo | 1000 | Modern Indian | Thane | Casual Dining |
| 34 | Angrezi Patiyalaa | 1200 | North Indian,Finger Food,American,Mexican,Chinese | Andheri | Casual Dining |
| 35 | Sandy's Den | 1000 | Fast Food,Bar Food | Chembur | Casual Dining |
| 36 | Big Bang Cuurry | 350 | North Indian,Biryani,Rolls | Andheri | none |
| 37 | Regano's | 600 | Continental,Fast Food,Italian,Desserts | Malad | Casual Dining |
| 38 | Maharashtra Lunch Home | 600 | Maharashtrian,Malwani,Konkan,Seafood | Kharghar | Casual Dining |
| 39 | Invento | 1200 | Chinese,Fast Food,North Indian,Italian,Mexican | Lower Parel | Casual Dining |
| 40 | Dessertino | 300 | Desserts,Ice Cream | Kandivali | Dessert Parlor |
| 41 | Fresh Food Co. | 500 | Continental,Healthy Food,Salad,Beverages,Desse... | Santacruz | none |
| 42 | Rajmanya- Seafood family restaurant | 800 | Maharashtrian,Konkan,Seafood | Vashi | Casual Dining |